/**
 * 双项提示框函数
 * @param {Object} sContent
 * @param {Object} sTitle
 * @param {Object} successCallBack
 * @param {Object} errorCallBack
 */
(function($, document) {
	$.popConfirm = function(content, title, successCallBack, errorCallBack) {
		var popConfirmDiv = document.createElement("div"); //创建一个div蒙版	
		popConfirmDiv.className = "mui-backdrop pop_confirm animated";
		popConfirmDiv.innerHTML = '<div class="mui-popup mui-popup-in">' +
			'<div class="mui-popup-inner">' +
			'<div class="mui-popup-title"></div>' +
			'<div class="mui-popup-content"></div>' +
			'</div>' +
			'<div class="mui-popup-buttons">' +
			'<span class="mui-popup-button btn_cancel">取消</span>' +
			'<span class="mui-popup-button btn_sure">确定</span>' +
			'</div>' +
			'</div>';
		$("body")[0].appendChild(popConfirmDiv); //创建的div蒙版加载到
		$(".pop_confirm .mui-popup-title")[0].innerText = title;
		$(".pop_confirm .mui-popup-content")[0].innerText = content;
		//弹出框的确定按钮操作
		$(".pop_confirm").on("tap", ".btn_sure", function() {
			successCallBack();
			jQuery(".pop_confirm").remove();
		});
		$(".pop_confirm").on("tap", ".btn_cancel", function() {
			errorCallBack ? errorCallBack() : "";
			jQuery(".pop_confirm").remove();
		});
	}
})(mui, document)